package com.yc.Di.test.bean2;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service
public class OrderBizImpl implements OrderBiz{
    @Autowired
    //指定名称注入,但是一般情况不准修改业务层代码
    //@Qualifier("orderDaoImpl")
    private OrderDao orderDao;
    public void setOrderDao(OrderDao orderDao) {
        this.orderDao = orderDao;
    }

    @Override
    public void makeOrder() {
        System.out.println("业务层");
        orderDao.addOrder();
    }
}
